import { createRouter,createWebHistory,RouteRecordRaw } from "vue-router";

//创建对象数组 将路由地址都放到
const routes:Array<RouteRecordRaw>=[
    {
        path:"/",
        name:"HelloWorld",
        component:()=>import('../components/HelloWorld.vue')
    },
    {
        path:"/Demo",
        name:"Demo",
        component:()=>import('../view/Demo.vue')
    },
    {
        path:"/StuDemo",
        name:"StuDemo",
        component:()=>import('../view/StuDemo.vue')
    },
]

//创建路由实例
const router=createRouter({
    history:createWebHistory(),
    routes
})

//导出路由
export default router